package com.wyp168.jvm001;

import java.sql.DriverManager;

/**
 * @ClassName ClassLoaderDemo004
 * @Description TODO
 * @Author wyp168
 * @Date 2022/7/28 11:28
 */
public class ClassLoaderDemo004 {
    public static void main(String[] args) {
        try {
            ClassLoader classLoader = Class.forName("java.lang.String").getClassLoader();
            System.out.println(classLoader);

            ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
            System.out.println(contextClassLoader);

            ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
            System.out.println(systemClassLoader);
            ClassLoader classLoader1 = DriverManager.getDrivers().getClass().getClassLoader();
            System.out.println(classLoader1);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
